def jdzh(fs):

    fs-=60;
    if(fs<0):
        return 0;
    fs=(int)(fs/5)*0.5+2;
    if(fs>=5):
        return 5.0;
    return fs;
if __name__ == '__main__':
    zjd=0;
    zxf=0;
    while(True):
        (xf,jd)= map(float,input("输入学分，绩点\n").split());
        zjd+=jdzh(jd)*xf;
        zxf+=xf;
        print("平均绩点为："+str(zjd/zxf)+"\n")